package dataStructures;

import twitter4j.Tweet;

public class MyTweet {
	public String name;
	public String text;
	public String time;
	public Location location;
	
	public MyTweet() {
		
	}
	
	public MyTweet(String name, String text, String time, Location location) {
		this.name = name;
		this.text = text;
		this.time = time;
		this.location = location;		
	}
	
	public MyTweet(Tweet tweet) {
		this.name = tweet.getFromUser();
		this.text = tweet.getText();
		this.time = tweet.getCreatedAt().toString();
//		System.out.println(tweet);
//		System.out.println(this);
		if (tweet.getGeoLocation() != null) 
			this.location = new Location(tweet.getGeoLocation().toString());

	}

	public String toString() {
		return "name:" + name.substring(0, 2) + " text: " + text.substring(0, 2) + " time:" + time + " loc:" + location;
	}
}